﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EntityModel
{
    public class Car:BaseEntity
    {
        /// <summary>
        /// 唯一标识符
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid id { get; set; }
        /// <summary>
        /// 材料
        /// </summary>
        public MaterialEnum Material { get; set; }
        /// <summary>
        ///型号 
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 百米加速
        /// </summary>
        public decimal Acceleration { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }
        /// <summary>
        /// 品牌
        /// </summary>
        public BrandEnum Brand { get; set; }
    }
    /// <summary>
    ///材料
    /// </summary>
    public enum MaterialEnum
    {
        塑料=0,
        合金=1,
        金属=2,
        复合=3,
    }
    public enum BrandEnum
    {
        大众=0,
        比亚迪=1,
        奥迪=2,
        奔驰=3,
        宝马=4
    }
}
